package com.sky.mapper;

import com.sky.anno.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface FlavorMapper {

    /**
     * 批量插入口味数据
     * @param dishFlavorListflavors
     */
    void insertBatch(List<DishFlavor> dishFlavorListflavors);

    /**
     * 根据菜品id删除口味数据
     * @param id
     */
    @Delete("delete  from dish_flavor where dish_id = #{id}")
    void deleteByDishId(Long id);

    /**
     * 根据ID查询口味信息
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id = #{id}")

    List<DishFlavor> getByDishId(Long id);
}
